From 933dbed7f26630856ae46c0ae7e09cf10c021fae Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Fri, 5 Jun 2026 16:43:45 +0800 Subject: [PATCH] appDisplay: Animate whole icon tile when expanding label This gives a smoother whole-tile expand animation, while retaining the old ellipsize-and-shift-up collapse animation. Part-of: (cherry picked from commit 32171c0be245829746755987816a89b7de472486) --- js/ui/appDisplay.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 105796dc2..f967b5ea6 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1896,16 +1896,21 @@ class AppViewItem extends St.Button { if (!layout.is_wrapped() && !layout.is_ellipsized()) return; - label.remove_transition('allocation'); + const expand = this._forcedHighlight || this.hover || this.has_key_focus(); + if (this._expand === expand) + return; + this._expand = expand; - const id = label.connect('notify::allocation', () => { - label.restore_easing_state(); - label.disconnect(id); + const leader = expand ? this : label; + leader.remove_transition('allocation'); + + const id = leader.connect('notify::allocation', () => { + leader.restore_easing_state(); + leader.disconnect(id); }); - const expand = this._forcedHighlight || this.hover || this.has_key_focus(); - label.save_easing_state(); - label.set_easing_duration(expand + leader.save_easing_state(); + leader.set_easing_duration(expand ? APP_ICON_TITLE_EXPAND_TIME : APP_ICON_TITLE_COLLAPSE_TIME); clutterText.set({ -- 2.39.5